﻿using Microsoft.AspNet.SignalR;
using Microsoft.AspNet.SignalR.Hubs;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SignalRServer
{
    [HubName("IotMessage")]
    public class MessageHub:Hub
    {
        /// <summary>
        /// 编写发送信息的方法
        /// </summary>
        /// <param name="message"></param>
        public void Send(string message)
        {
            //调用所有客户注册的本地的JS方法()
            Clients.All.Send(message);
        }
    }
}
